<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>ajax测试</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache">
    <meta http-equiv="Expires" content="0">
    <script language="javaScript" src="http://localhost:8080/assets/js/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        function getData() {
            $.ajax({
                type:"POST",
                url:"ajax/test.do",
                error:function(data){
                    alert("出错了！！:"+data.msg);
                },
                success:function(data){
                    alert("success:"+data.msg);
                }
            });
        }

    </script>
</head>
<body>
<input type="button" id="bu" onclick="getData()" value="测试">
</body>
</html>
